import { defineStore } from 'pinia'
import { sourceHeader } from '@/utils/plugins'

interface gameState {
    gameDataList: gameDataList[]
}

interface gameDataList {
    id: string | null
    title: string | null
    path: string | null
}


const gameStore = defineStore('gameDataStore', {
    state: ():gameState  => {
        return {
            // 游戏列表数据
            gameDataList: [
                {
                    id: '1',
                    title: '功德木鱼',
                    path: '/weiGame/woodenFish',
                },
                {
                    id: '2',
                    title: '打砖块',
                    path: '/weiGame/breakBrick',
                },
                {
                    id: '3',
                    title: '2048',
                    path: '/weiGame/2048',
                },
                {
                    id: '4',
                    title: '贪吃蛇',
                    path: '/weiGame/gluttonousSnake',
                },
                {
                    id: '5',
                    title: '五子棋',
                    path: '/weiGame/FiveChess',
                },
                {
                    id: '6',
                    title: '消消乐',
                    path: '/weiGame/vanishGame',
                },
            ],
        }
    },
    actions: {
        handlerSetGameItemDataList(val: any) {
            
        },
    }
})

export default gameStore